<page-header model="ctrl.navModel"></page-header>

<div class="page-container page-body">
  <react-profile-wrapper></react-profile-wrapper>

  <h3 class="page-heading">会话</h3>
  <div class="gf-form-group">
    <table class="filter-table form-inline">
      <thead>
        <tr>
          <th>最后一次登录</th>
          <th>登录时间</th>
          <th>IP地址</th>
          <th>浏览器 &amp; 系统</th>
          <th></th>
        </tr>
      </thead>
      <tbody>
        <tr ng-repeat="session in ctrl.sessions">
          <td ng-if="session.isActive">现在</td>
          <td ng-if="!session.isActive">{{ session.seenAt }}</td>
          <td>{{ session.createdAt }}</td>
          <td>{{ session.clientIp }}</td>
          <td>{{ session.browser }} 在 {{ session.os }} {{ session.osVersion }}</td>
          <td>
            <button class="btn btn-danger btn-small" ng-click="ctrl.revokeUserSession(session.id)">
              <i class="fa fa-power-off"></i>
            </button>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
</div>
